<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLyDataTable extends Migration
{
    /**
     * Run the migrations.
     * author wjb
     * 开奖数据表
     * @return void
     */
    public function up()
    {
        Schema::create('ly_data', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('type')->default(0)->comment("彩票种类，对应ly_type.id");
            $table->string('number')->comment('期号(场次)');
            $table->string('data')->comment('开奖号码，半角逗号分开');
            $table->timestamps();


            //建立索引
            $table->index('id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('ly_data');
    }
}
